inherited dlgSelReturnedCheck: TdlgSelReturnedCheck
  Left = 414
  Top = 238
  Caption = #1042#1099#1073#1086#1088' '#1095#1077#1082#1072' '#1076#1083#1103' '#1074#1086#1079#1074#1088#1072#1090#1072
  Constraints.MinHeight = 250
  Constraints.MinWidth = 550
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 542
    Height = 31
    inherited BitBtn1: TBitBtn
      Left = 593
      Top = 4
      Caption = #1042#1099#1073#1088#1072#1090#1100
      Enabled = False
      Visible = False
    end
    inherited BitBtn2: TBitBtn
      Left = 695
      Top = 4
    end
  end
  inherited ToolBar1: TToolBar
    Top = 274
    Height = 0
    Enabled = False
    inherited ToolButton1: TToolButton
      Enabled = False
    end
    inherited ToolButton2: TToolButton
      Enabled = False
    end
    inherited ToolButton3: TToolButton
      Enabled = False
    end
    inherited ToolButton4: TToolButton
      Enabled = False
    end
  end
  object gbOtherReciepts: TGroupBox [2]
    Left = 0
    Top = 274
    Width = 792
    Height = 268
    Align = alClient
    Caption = ' '#1063#1077#1082#1080' '#1087#1088#1086#1095#1080#1093' '#1087#1083#1072#1090#1077#1078#1077#1081' '
    TabOrder = 2
    object dbgOtherReciepts: TDBGridEh
      Left = 2
      Top = 15
      Width = 788
      Height = 251
      Align = alClient
      DataGrouping.GroupLevels = <>
      DataSource = dsc_OtherReciepts
      Flat = True
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'MS Sans Serif'
      FooterFont.Style = []
      Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
      RowDetailPanel.Color = clBtnFace
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      UseMultiTitle = True
      VTitleMargin = 5
      OnDblClick = dbgRecieptsDblClick
      Columns = <
        item
          EditButtons = <>
          FieldName = 'RECIEPT'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'FIO'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'DOCNO'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'PAY_RATE'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'DOGHEADER'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'NAME'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'SUMMA'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'CREATER'
          Footers = <>
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
  end
  object gbReciepts: TGroupBox [3]
    Left = 0
    Top = 0
    Width = 792
    Height = 274
    Align = alTop
    Caption = ' '#1063#1077#1082#1080' '#1087#1083#1072#1090#1077#1078#1077#1081' '#1046#1050#1061' '
    TabOrder = 3
    object Splitter1: TSplitter
      Left = 402
      Top = 15
      Width = 5
      Height = 257
    end
    object dbgRecieptPays: TDBGridEh
      Left = 407
      Top = 15
      Width = 383
      Height = 257
      Align = alClient
      Constraints.MinWidth = 252
      DataGrouping.GroupLevels = <>
      DataSource = dsc_RecieptPays
      Flat = True
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'MS Sans Serif'
      FooterFont.Style = []
      Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
      ReadOnly = True
      RowDetailPanel.Color = clBtnFace
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      UseMultiTitle = True
      VTitleMargin = 5
      Columns = <
        item
          EditButtons = <>
          FieldName = 'NAME'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'SUMMA'
          Footers = <>
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
    object dbgReciepts: TDBGridEh
      Left = 2
      Top = 15
      Width = 400
      Height = 257
      Align = alLeft
      Constraints.MaxWidth = 400
      Constraints.MinHeight = 100
      Constraints.MinWidth = 300
      DataGrouping.GroupLevels = <>
      DataSource = dsc_Reciepts
      Flat = True
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'MS Sans Serif'
      FooterFont.Style = []
      Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
      RowDetailPanel.Color = clBtnFace
      TabOrder = 1
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      UseMultiTitle = True
      VTitleMargin = 5
      OnDblClick = dbgRecieptsDblClick
      Columns = <
        item
          EditButtons = <>
          FieldName = 'RECIEPT'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'SUMMA'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'ADDRESS'
          Footers = <>
        end
        item
          EditButtons = <>
          FieldName = 'CREATER'
          Footers = <>
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
  end
  inherited ActionList1: TActionList
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      SecondaryShortCuts.Strings = (
        'Esc')
      OnExecute = aCancelExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Section = 'dlgSelReturnedCheck'
    StoredProps.Strings = ()
  end
  object ds_Reciepts: TpFIBDataSet
    SelectSQL.Strings = (
      'select r.reciept, sum(r.summa) as summa,'
      
        '       (select rname from user_getfullname (r.createuserid)) as ' +
        'creater,'
      '       v.address,'
      '       v.g_licschet'
      '  from reciepts r, user_getcode u, v_abons v'
      '  where r.createdate = current_date'
      '     and r.createuserid = u.rcode'
      '     and r.abonent_id = v.id'
      
        '  group by r.reciept, r.createuserid, r.abonent_id, v.address, v' +
        '.g_licschet'
      '  having sum(r.summa) > 0'
      '  order by r.reciept desc, 4')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 80
    Top = 76
    object ds_RecieptsRECIEPT: TFIBStringField
      DisplayLabel = #8470' '#1095#1077#1082#1072
      DisplayWidth = 10
      FieldName = 'RECIEPT'
      Size = 16
      EmptyStrToNull = True
    end
    object ds_RecieptsSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072
      DisplayWidth = 8
      FieldName = 'SUMMA'
      Size = 2
      RoundByScale = True
    end
    object ds_RecieptsADDRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      DisplayWidth = 30
      FieldName = 'ADDRESS'
      Size = 245
      EmptyStrToNull = True
    end
    object ds_RecieptsCREATER: TFIBStringField
      DisplayLabel = #1050#1072#1089#1089#1080#1088
      DisplayWidth = 20
      FieldName = 'CREATER'
      Size = 150
      EmptyStrToNull = True
    end
    object ds_RecieptsG_LICSCHET: TFIBStringField
      FieldName = 'G_LICSCHET'
      EmptyStrToNull = True
    end
  end
  object LocalTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 140
    Top = 76
  end
  object ds_RecieptPays: TpFIBDataSet
    SelectSQL.Strings = (
      'select r.summa, s.name'
      '  from reciepts r, pays p, services s'
      '  where r.abonent_id = :pabonent_id'
      '    and r.reciept = :reciept'
      '    and p.id = r.payment_id'
      '    and s.id = p.group_id'
      '  order by 2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    DataSource = dsc_Reciepts
    Left = 412
    Top = 68
    object ds_RecieptPaysNAME: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 30
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_RecieptPaysSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072
      FieldName = 'SUMMA'
      Size = 2
      RoundByScale = True
    end
  end
  object dsc_Reciepts: TDataSource
    DataSet = ds_Reciepts
    Left = 80
    Top = 108
  end
  object dsc_RecieptPays: TDataSource
    DataSet = ds_RecieptPays
    Left = 412
    Top = 100
  end
  object ds_OtherReciepts: TpFIBDataSet
    SelectSQL.Strings = (
      
        'select r.reciept, r.fio, r.docno, r.pay_rate, rd.dogheader, rg.n' +
        'ame, sum(r.summa) as summa,'
      
        '       (select rname from user_getfullname (r.createuserid)) as ' +
        'creater'
      '  from user_getcode u'
      
        '  join rtp_pays r on r.createdate = current_date and r.createuse' +
        'rid = u.rcode'
      '  join rtp_dogovors rd on rd.id = r.rpt_dog_id'
      '  join rtp_groups rg on rg.id = rd.rpt_group_id'
      
        '  group by r.reciept, r.fio, r.docno, r.pay_rate, rd.dogheader, ' +
        'rg.name, r.createuserid'
      '  having sum(r.summa) > 0'
      '  order by r.reciept desc')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    DataSource = dsc_Reciepts
    Left = 412
    Top = 304
    object ds_OtherRecieptsRECIEPT: TFIBStringField
      DisplayLabel = #8470' '#1095#1077#1082#1072
      DisplayWidth = 10
      FieldName = 'RECIEPT'
      Size = 16
      EmptyStrToNull = True
    end
    object ds_OtherRecieptsFIO: TFIBStringField
      DisplayLabel = #1060#1048#1054
      DisplayWidth = 25
      FieldName = 'FIO'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_OtherRecieptsDOCNO: TFIBStringField
      DisplayLabel = #8470' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      DisplayWidth = 15
      FieldName = 'DOCNO'
      Size = 60
      EmptyStrToNull = True
    end
    object ds_OtherRecieptsPAY_RATE: TFIBBCDField
      DisplayLabel = #1050#1086#1084#1080#1089#1089#1080#1103
      FieldName = 'PAY_RATE'
      Size = 2
      RoundByScale = True
    end
    object ds_OtherRecieptsDOGHEADER: TFIBStringField
      DisplayLabel = #1055#1086#1083#1091#1095#1072#1090#1077#1083#1100
      DisplayWidth = 20
      FieldName = 'DOGHEADER'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_OtherRecieptsNAME: TFIBStringField
      DisplayLabel = #1053#1072#1079#1085#1072#1095#1077#1085#1080#1077
      DisplayWidth = 20
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_OtherRecieptsSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072
      FieldName = 'SUMMA'
      Size = 2
      RoundByScale = True
    end
    object ds_OtherRecieptsCREATER: TFIBStringField
      DisplayLabel = #1050#1072#1089#1089#1080#1088
      DisplayWidth = 20
      FieldName = 'CREATER'
      Size = 150
      EmptyStrToNull = True
    end
  end
  object dsc_OtherReciepts: TDataSource
    DataSet = ds_OtherReciepts
    Left = 412
    Top = 336
  end
end
